package jiuqi.dao;

import jiuqi.pojo.User;
import jiuqi.pojo.query.UserQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserDao {
    //查询所有信息
    public List<User> listUser();

    //根据用户名查询并分页显示
    public List<User> listUserByName(UserQuery userQuery);

    // 根据id删除
    public int deleteUserById(Integer id);

    //根据id查询
    public User queryUserById(Integer id);

    //修改
    public int updateUser(User user);

    //通过名字精准查询
    public List<User> listUserByNameOne(UserQuery userQuery);

    //新增
    public int addUser(User user);
}
